package com.wjf.birdfish.hibernate;

import java.util.List;
import javax.servlet.http.HttpServletRequest;

public interface Page<T> {
    public static final int REQUEST_SCOPE = 0;
    public static final int SESSION_SCOPE = 1;
    public static final String PAGE_KEY = "_page_key";


    public int getPageIndex();

    public int getPageNumber();

    public Page<T> nextPage();

    public Page<T> prevPage();

    public Page<T> lastPage();

    public Page<T> firstPage();

    public Page<T> gotoPage(int pageIndex);

    public List<T> getData();

    public int getPageSize();

    public int getRecordNumber();

    public void saveTo(HttpServletRequest request);

    public void saveTo(HttpServletRequest request, int scope);

}
